<%@Page Language="VB" %>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<!-- #include file="style.inc" -->
</head>
<body>
<!--------------------------------------------------------------------------->
<span class="heading">The HTML Control ServerClick Event</span><p />

<form runat="server">

  <input id="MyButton" type="button" value="My Button"
         onserverclick="MyCode" runat="server" /> &nbsp;

  <input id="MySubmitButton" type="submit" value="My Submit Button"
         onserverclick="MyCode" runat="server" /> &nbsp;

  <input id="MyImageButton" type="image" src="ClickmeButton.gif" align="absbottom"
         onserverclick="MyImageCode" runat="server" />

</form>

<div id="divResult" runat="server" enableviewstate="false" />


<script runat="server">

   Sub MyCode(objSender As Object, objArgs As EventArgs)
     divResult.InnerHtml += "ServerClick event detected in control '" _
                         & objSender.ID & "'<br />"
   End Sub

   Sub MyImageCode(objSender As Object, objArgs As ImageClickEventArgs)
     divResult.InnerHtml += "ServerClick event detected in control '" _
                         & objSender.ID & "' at X=" & objArgs.X _
                         & " Y=" & objArgs.Y & "<br />"
   End Sub

</script>

<!--------------------------------------------------------------------------->
<!-- #include file="foot.inc" -->
</body>
</html>

